Formal description of democracy